{extend name='base'/}
{block name='content'}
<ol class="breadcrumb" style="background-color: #f9f9f9;padding:8px 0;margin-bottom:10px;">
    <li>
        <a href=""><i class="fa fa-cogs"></i>
            友链管理</a>
    </li>
    <li class="active">
        <a href="">添加友链</a>
    </li>

</ol>
<ul class="nav nav-tabs" role="tablist">
    <li><a href="{:url('index')}">友链首页</a></li>
    {if condition="input('param.link_id')"}
    <li class="active"><a href="">添加编辑</a></li>

    {else/}
    <li class="active"><a href="">添加友链</a></li>

    {/if}
</ul>
<form class="form-horizontal" id="form" action="" method="post">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">友链管理</h3>
        </div>
        <div class="panel-body">
            <div class="form-group">
                <label for="" class="col-sm-2 control-label">友链名称</label>
                <div class="col-sm-9">
                    <input type="text" name="link_name"  class="form-control" value="{$oldData['link_name']}" placeholder="请填写友链名称">
                </div>
            </div>

            <div class="form-group">
                <label for="" class="col-sm-2 control-label">url地址</label>
                <div class="col-sm-9">
                    <input type="url" name="link_url"  class="form-control" placeholder="" value="{$oldData['link_url']}">
                </div>
            </div>
            <div class="form-group">
                <label for="" class="col-sm-2 control-label">排序</label>
                <div class="col-sm-9">
                    <input type="number" name="link_sort"  class="form-control" placeholder="" value="{$oldData['link_sort']}">
                </div>
            </div>
        </div>
    </div>
    <input type="hidden" name="link_id" value="{:input('param.link_id')}">
    <button class="btn btn-primary" type="submit">确定</button>
</form>

{/block}